home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / WindowMaker / src / appicon.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-20  |  3.9 KB  |  119 lines

  1. /* appicon.h- application icon
  2.  * 
  3.  *  Window Maker window manager
  4.  * 
  5.  *  Copyright (c) 1997, 1998 Alfredo K. Kojima
  6.  * 
  7.  *  This program is free software; you can redistribute it and/or modify
  8.  *  it under the terms of the GNU General Public License as published by
  9.  *  the Free Software Foundation; either version 2 of the License, or
  10.  *  (at your option) any later version.
  11.  *
  12.  *  This program is distributed in the hope that it will be useful,
  13.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  *  GNU General Public License for more details.
  16.  *
  17.  *  You should have received a copy of the GNU General Public License
  18.  *  along with this program; if not, write to the Free Software
  19.  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 
  20.  *  USA.
  21.  */
  22.  
  23.  
  24. #ifndef WMAPPICON_H_
  25. #define WMAPPICON_H_
  26.  
  27. #include <wraster.h>
  28.  
  29. #include "wcore.h"
  30. #include "window.h"
  31. #include "icon.h"
  32. #include "application.h"
  33.  
  34. #ifdef REDUCE_APPICONS
  35. typedef struct WAppIconAppList {
  36.     struct WAppIconAppList *prev;
  37.     struct WAppIconAppList *next;
  38.     WApplication *wapp;
  39. } WAppIconAppList;
  40. #endif
  41.  
  42. typedef struct WAppIcon {
  43.     short xindex;
  44.     short yindex;
  45.     struct WAppIcon *next;
  46.     struct WAppIcon *prev;
  47.     WIcon *icon;
  48.     
  49.     char *client_machine;
  50.     
  51.     int x_pos, y_pos;               /* absolute screen coordinate */
  52.     
  53.     char *command;               /* command used to launch app */
  54.     
  55. #ifdef OFFIX_DND
  56.     char *dnd_command;               /* command to use when something is */
  57.                        /* dropped on us */
  58. #endif
  59.     
  60.     char *wm_class;
  61.     char *wm_instance;
  62.     pid_t pid;                   /* for apps launched from the dock */
  63.     Window main_window;
  64. #ifdef REDUCE_APPICONS
  65.     /* There are a number of assumptions about structures in the code,
  66.      * but nowhere do I see them explicitly stated. I'll rip this out later.
  67.      * If applist is not NULL, applist->wapp will always point to a valid
  68.      * structure. Knowing this removes the need for useless checks....
  69.      * AS LONG AS NO ONE VIOLATES THIS ASSUMPTION. -cls
  70.      */
  71.     WAppIconAppList *applist;           /* list of apps bound to appicon */
  72. #endif
  73.     struct WDock *dock;               /* In which dock is docked. */
  74.     
  75.     struct _AppSettingsPanel *panel;    /* Settings Panel */
  76.     
  77.     unsigned int gnustep_app:1;           /* if this is a GNUstep application */
  78.     unsigned int docked:1;
  79.     unsigned int omnipresent:1;        /* If omnipresent when docked in clip */
  80.     unsigned int attracted:1;           /* If it was attracted by the clip */
  81.     unsigned int launching:1;
  82.     unsigned int running:1;           /* application is already running */
  83.     unsigned int relaunching:1;           /* launching 2nd instance */
  84.  
  85.     unsigned int forced_dock:1;
  86.     unsigned int auto_launch:1;           /* launch app on startup */
  87.     unsigned int remote_start:1;
  88.     unsigned int updated:1;
  89.     unsigned int editing:1;           /* editing docked icon */
  90.     unsigned int drop_launch:1;           /* launching from drop action */
  91.     unsigned int destroyed:1;           /* appicon was destroyed */
  92.     unsigned int buggy_app:1;           /* do not make dock rely on hints 
  93.                     * set by app */
  94.     
  95.     unsigned int lock:1;           /* do not allow to be destroyed */
  96.     
  97. #ifdef REDUCE_APPICONS
  98.     unsigned int num_apps;           /* length of applist */
  99. #endif
  100. } WAppIcon;
  101.  
  102.  
  103. WAppIcon *wAppIconCreate(WWindow *leader_win);
  104. WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char *wm_instance,
  105.                 char *wm_class, int tile);
  106.  
  107. void wAppIconDestroy(WAppIcon *aicon);
  108.  
  109. void wAppIconPaint(WAppIcon *aicon);
  110.  
  111. Bool wAppIconChangeImage(WAppIcon *icon, char *file);
  112.  
  113. void wAppIconMove(WAppIcon *aicon, int x, int y);
  114.  
  115. #ifdef REDUCE_APPICONS
  116. unsigned int wAppIconReduceAppCount(WApplication *wapp);
  117. #endif
  118. #endif
  119.